/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JInternalFramePrchaseBill1.java
 *
 * Created on Dec 4, 2011, 3:34:04 PM
 */
package callcenter;

import Database.Addministave;
import Database.Customer;
import Database.DetailPurchaseBill;
import Database.Product;
import Database.PurchaseBill;
import Database.Vender;
import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import Util.Check;

/**
 *
 * @author user
 */
public class JInternalFramePrchaseBill1 extends javax.swing.JInternalFrame {

    private int b;
    private String langue = new String();
    private String country = new String();
    private String str = new String();
    private Locale lc = null;
    private ResourceBundle rb = null;
    private  File f = new File("."); 
    Vector<Vector<Object>> createtablepurcharbill=new Vector<Vector<Object>> (); 
    Vector<Vender> combovender=new Vector<Vender> (); 
    Vector<Addministave> adl=new Vector<Addministave> (); 
    Vector<Product> productl=new Vector<Product> (); 
    Vector<Product> pdl1=new Vector<Product> (); 
    //Vector<Product> getprd=new Vector<Product> (); 
    Vector<Customer> ctl=new Vector<Customer> ();
    
    /** Creates new form JInternalFramePrchaseBill1 */
    public JInternalFramePrchaseBill1() {
        initComponents();
        Medium.jifsb1 = this;
        b=Medium.jf1.KQ();
        cretatetalbalepurchaseill();
        combovender();
        Createcbad();
      //  Createcoboproduc();
        jTabbedPane2.setVisible(false);
        jComboBoxproduct1.setEnabled(false);
        jButton2.setEnabled(false);
        jButton4.setEnabled(false);
//        jButton15.setEnabled(false);
        hiren();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
//     private void Createcoboproduc()
//    {
//        Product pd=new Product();
//        productl=pd.Vectorproduct();
//        DefaultComboBoxModel dc=new DefaultComboBoxModel();
//        dc.setSelectedItem("Select");
//        for(Product pdd:productl)
//        {
//            dc.addElement(pdd.getProductName());
//            jComboBoxproduct1.setModel(dc);
//            
//        }
//    }
     private void Createcoboproduc1()
    {
        Product pd=new Product();
        pd.setUnit(jComboBoxunit.getSelectedItem().toString());
        productl=pd.Vectorproduct();
        DefaultComboBoxModel dc=new DefaultComboBoxModel();
        dc.setSelectedItem("Select");
        for(Product pdd:productl)
        {
            dc.addElement(pdd.getProductName());
            jComboBoxproduct1.setModel(dc);
            
        }
    }
    public void Createcbad()
    {
        Addministave ad=new Addministave();
        adl=ad.Addlist();
        DefaultComboBoxModel ac=new DefaultComboBoxModel();
        ac.setSelectedItem("Select");
        for(Addministave add:adl)
        {
            ac.addElement(add.getAccountname());
            jComboBoxaccname1.setModel(ac);
        }
    }
        public void combovender()
        {
            Vender vd=new Vender();
            combovender=vd.getvender();
             DefaultComboBoxModel dc=new DefaultComboBoxModel();
            dc.setSelectedItem("Select");
        for(Vender vdd:combovender)
        {
            dc.addElement(vdd.getVenderName());
            jComboBoxvender1.setModel(dc);
            
        }
        }
        private void Translate(String landue, String tenqg, String chuoi) {
        //callcenter/resources/JInternalFramePrchaseBill1_en_US
        lc = new Locale(landue, tenqg);
        rb = ResourceBundle.getBundle("callcenter/resources/" + chuoi, lc);
        jTabbedPane1.setTitleAt(0, rb.getString("tab1"));
        jTabbedPane1.setTitleAt(1, rb.getString("tab2"));
        TitledBorder t = (TitledBorder) this.jPanel3.getBorder();
        t.setTitle(rb.getString("jPanel3.border.title"));
        jLabel1.setText(rb.getString("jLabel1.text"));
        jLabel2.setText(rb.getString("jLabel2.text"));
        jLabel3.setText(rb.getString("jLabel3.text"));
        jLabel4.setText(rb.getString("jLabel4.text"));
        jLabel5.setText(rb.getString("jLabel5.text"));
        jLabel6.setText(rb.getString("jLabel6.text"));
        jLabel7.setText(rb.getString("jLabel7.text"));
        
        jLabel8.setText(rb.getString("jLabel8.text"));
        jButton1.setText(rb.getString("jButton1.text"));
        jButton2.setText(rb.getString("jButton2.text"));
        jButton3.setText(rb.getString("jButton3.text"));
        jButton4.setText(rb.getString("jButton4.text"));
        TitledBorder t2 = (TitledBorder) this.jPanel4.getBorder();
        t2.setTitle(rb.getString("jPanel4.border.title"));
        jLabel9.setText(rb.getString("jLabel9.text"));
        jLabel11.setText(rb.getString("jLabel11.text"));
//        jLabel12.setText(rb.getString("jLabel12.text"));
        jCheckBox1.setText(rb.getString("jCheckBox1.text"));
        jCheckBox2.setText(rb.getString("jCheckBox2.text"));
  //      jCheckBox3.setText(rb.getString("jCheckBox3.text"));
        TitledBorder t3 = (TitledBorder) this.jPanel32.getBorder();
        t3.setTitle(rb.getString("jPanel32.border.title"));
    }
        public void cretatetalbalepurchaseill()
        {
            Vector<String> cols=new Vector<String>();
            cols.add("BillId");
            cols.add("Bill Name");
            cols.add("Vender Name");                    
            cols.add("Account Confirmed");
            cols.add("Build Date");
            cols.add("State");
            cols.add("Unit");
            cols.add("TotalCost");
            PurchaseBill pc=new PurchaseBill();
            DefaultTableModel dc=new DefaultTableModel(pc.tablepurchase(),cols);
            jTablepurchase.setModel(dc);
        }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jPanel20 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jPanel27 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jPanel63 = new javax.swing.JPanel();
        jTextField5 = new javax.swing.JTextField();
        jPanel96 = new javax.swing.JPanel();
        jTextField4 = new javax.swing.JTextField();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel6 = new javax.swing.JPanel();
        jPanel101 = new javax.swing.JPanel();
        jPanel102 = new javax.swing.JPanel();
        jPanel103 = new javax.swing.JPanel();
        jPanel104 = new javax.swing.JPanel();
        jPanel113 = new javax.swing.JPanel();
        jPanel114 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        jPanel115 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jPanel116 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        jPanel117 = new javax.swing.JPanel();
        jPanel118 = new javax.swing.JPanel();
        jPanel119 = new javax.swing.JPanel();
        jPanel105 = new javax.swing.JPanel();
        jPanel106 = new javax.swing.JPanel();
        jPanel122 = new javax.swing.JPanel();
        jPanel123 = new javax.swing.JPanel();
        jButton13 = new javax.swing.JButton();
        jPanel124 = new javax.swing.JPanel();
        jButton14 = new javax.swing.JButton();
        jPanel107 = new javax.swing.JPanel();
        jPanel108 = new javax.swing.JPanel();
        jPanel110 = new javax.swing.JPanel();
        jPanel111 = new javax.swing.JPanel();
        jTextFieldprice = new javax.swing.JTextField();
        jPanel112 = new javax.swing.JPanel();
        jTextFieldquantity = new javax.swing.JTextField();
        jPanel109 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextAreadesription = new javax.swing.JTextArea();
        jPanel98 = new javax.swing.JPanel();
        jPanel125 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jPanel127 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTabledetailpurcharbill = new javax.swing.JTable();
        jPanel126 = new javax.swing.JPanel();
        jPanel128 = new javax.swing.JPanel();
        jPanel132 = new javax.swing.JPanel();
        jPanel133 = new javax.swing.JPanel();
        jPanel138 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jPanel139 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jPanel140 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        jPanel141 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        jPanel146 = new javax.swing.JPanel();
        jPanel129 = new javax.swing.JPanel();
        jPanel131 = new javax.swing.JPanel();
        jPanel134 = new javax.swing.JPanel();
        jPanel136 = new javax.swing.JPanel();
        jTextField1prd = new javax.swing.JTextField();
        jPanel137 = new javax.swing.JPanel();
        jTextFieldpr = new javax.swing.JTextField();
        jPanel142 = new javax.swing.JPanel();
        jTextFieldqt = new javax.swing.JTextField();
        jPanel135 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTextAreadet = new javax.swing.JTextArea();
        jPanel99 = new javax.swing.JPanel();
        jLabel19 = new javax.swing.JLabel();
        jPanel100 = new javax.swing.JPanel();
        jPanel148 = new javax.swing.JPanel();
        jPanel149 = new javax.swing.JPanel();
        jPanel150 = new javax.swing.JPanel();
        jPanel151 = new javax.swing.JPanel();
        jPanel160 = new javax.swing.JPanel();
        jPanel161 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jPanel162 = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        jPanel163 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jPanel164 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        jPanel165 = new javax.swing.JPanel();
        jPanel152 = new javax.swing.JPanel();
        jPanel153 = new javax.swing.JPanel();
        jPanel154 = new javax.swing.JPanel();
        jTextFieldvendername = new javax.swing.JTextField();
        jPanel155 = new javax.swing.JPanel();
        jTextFieldaddress = new javax.swing.JTextField();
        jPanel156 = new javax.swing.JPanel();
        jTextFieldemail = new javax.swing.JTextField();
        jPanel159 = new javax.swing.JPanel();
        jTextFieldphone = new javax.swing.JTextField();
        jPanel157 = new javax.swing.JPanel();
        jPanel167 = new javax.swing.JPanel();
        jButton16 = new javax.swing.JButton();
        jPanel168 = new javax.swing.JPanel();
        jButton19 = new javax.swing.JButton();
        jPanel169 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jTextFieldbillname = new javax.swing.JTextField();
        jPanel18 = new javax.swing.JPanel();
        jPanel145 = new javax.swing.JPanel();
        jButton18 = new javax.swing.JButton();
        jPanel147 = new javax.swing.JPanel();
        jComboBoxvender1 = new javax.swing.JComboBox();
        jPanel19 = new javax.swing.JPanel();
        jCalendarCombobuildate = new org.freixas.jcalendar.JCalendarCombo();
        jPanel21 = new javax.swing.JPanel();
        jComboBoxaccname1 = new javax.swing.JComboBox();
        jPanel22 = new javax.swing.JPanel();
        jPanel91 = new javax.swing.JPanel();
        state = new javax.swing.JComboBox();
        jPanel92 = new javax.swing.JPanel();
        jPanel93 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jPanel94 = new javax.swing.JPanel();
        jPanel95 = new javax.swing.JPanel();
        jTextFieldtotal = new javax.swing.JTextField();
        jPanel97 = new javax.swing.JPanel();
        jComboBoxunit = new javax.swing.JComboBox();
        jPanel23 = new javax.swing.JPanel();
        jPanel143 = new javax.swing.JPanel();
        jButton17 = new javax.swing.JButton();
        jPanel144 = new javax.swing.JPanel();
        jComboBoxproduct1 = new javax.swing.JComboBox();
        jPanel24 = new javax.swing.JPanel();
        jPanel25 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jPanel26 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();
        jPanel29 = new javax.swing.JPanel();
        jPanel30 = new javax.swing.JPanel();
        jButton4 = new javax.swing.JButton();
        jPanel57 = new javax.swing.JPanel();
        jButton6 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jPanel71 = new javax.swing.JPanel();
        jPanel73 = new javax.swing.JPanel();
        jPanel81 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jPanel74 = new javax.swing.JPanel();
        jPanel75 = new javax.swing.JPanel();
        jPanel76 = new javax.swing.JPanel();
        jButton7 = new javax.swing.JButton();
        jPanel77 = new javax.swing.JPanel();
        jButton9 = new javax.swing.JButton();
        jPanel78 = new javax.swing.JPanel();
        jPanel79 = new javax.swing.JPanel();
        jButton8 = new javax.swing.JButton();
        jPanel80 = new javax.swing.JPanel();
        jTextField6 = new javax.swing.JTextField();
        jPanel72 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTablepurchase = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jPanel31 = new javax.swing.JPanel();
        jPanel33 = new javax.swing.JPanel();
        jPanel34 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jPanel36 = new javax.swing.JPanel();
        jPanel38 = new javax.swing.JPanel();
        jPanel39 = new javax.swing.JPanel();
        jPanel40 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        jPanel41 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jPanel42 = new javax.swing.JPanel();
        jPanel43 = new javax.swing.JPanel();
        jPanel44 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jPanel46 = new javax.swing.JPanel();
        jPanel56 = new javax.swing.JPanel();
        jPanel58 = new javax.swing.JPanel();
        jPanel59 = new javax.swing.JPanel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jPanel60 = new javax.swing.JPanel();
        jCheckBox2 = new javax.swing.JCheckBox();
        jPanel61 = new javax.swing.JPanel();
        jPanel62 = new javax.swing.JPanel();
        jPanel64 = new javax.swing.JPanel();
        jPanel65 = new javax.swing.JPanel();
        jPanel47 = new javax.swing.JPanel();
        jPanel48 = new javax.swing.JPanel();
        jPanel49 = new javax.swing.JPanel();
        jPanel50 = new javax.swing.JPanel();
        jTextField3 = new javax.swing.JTextField();
        jPanel51 = new javax.swing.JPanel();
        jComboBox5 = new javax.swing.JComboBox();
        jPanel52 = new javax.swing.JPanel();
        jPanel53 = new javax.swing.JPanel();
        jPanel66 = new javax.swing.JPanel();
        jPanel67 = new javax.swing.JPanel();
        jPanel68 = new javax.swing.JPanel();
        jButton5 = new javax.swing.JButton();
        jPanel54 = new javax.swing.JPanel();
        jPanel55 = new javax.swing.JPanel();
        jPanel32 = new javax.swing.JPanel();
        jPanel69 = new javax.swing.JPanel();
        jPanel82 = new javax.swing.JPanel();
        jPanel90 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        jPanel83 = new javax.swing.JPanel();
        jPanel84 = new javax.swing.JPanel();
        jPanel85 = new javax.swing.JPanel();
        jButton10 = new javax.swing.JButton();
        jPanel86 = new javax.swing.JPanel();
        jButton12 = new javax.swing.JButton();
        jPanel87 = new javax.swing.JPanel();
        jPanel88 = new javax.swing.JPanel();
        jButton11 = new javax.swing.JButton();
        jPanel89 = new javax.swing.JPanel();
        jTextField7 = new javax.swing.JTextField();
        jPanel70 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(callcenter.CallcenterApp.class).getContext().getResourceMap(JInternalFramePrchaseBill1.class);
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jPanel20.setName("jPanel20"); // NOI18N

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jPanel27.setName("jPanel27"); // NOI18N

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N

        jPanel63.setName("jPanel63"); // NOI18N

        javax.swing.GroupLayout jPanel63Layout = new javax.swing.GroupLayout(jPanel63);
        jPanel63.setLayout(jPanel63Layout);
        jPanel63Layout.setHorizontalGroup(
            jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel63Layout.setVerticalGroup(
            jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jTextField5.setText(resourceMap.getString("jTextField5.text")); // NOI18N
        jTextField5.setName("jTextField5"); // NOI18N

        jPanel96.setName("jPanel96"); // NOI18N

        javax.swing.GroupLayout jPanel96Layout = new javax.swing.GroupLayout(jPanel96);
        jPanel96.setLayout(jPanel96Layout);
        jPanel96Layout.setHorizontalGroup(
            jPanel96Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel96Layout.setVerticalGroup(
            jPanel96Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        jTextField4.setText(resourceMap.getString("jTextField4.text")); // NOI18N
        jTextField4.setName("jTextField4"); // NOI18N

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setFrameIcon(resourceMap.getIcon("Form.frameIcon")); // NOI18N
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(970, 520));

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setLayout(new java.awt.GridLayout(2, 1, 4, 4));

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel3.border.border.lineColor"), 3), resourceMap.getString("jPanel3.border.title"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setLayout(new java.awt.BorderLayout());

        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setPreferredSize(new java.awt.Dimension(550, 190));
        jPanel5.setLayout(new java.awt.BorderLayout());

        jTabbedPane2.setName("jTabbedPane2"); // NOI18N

        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setLayout(new java.awt.BorderLayout());

        jPanel101.setName("jPanel101"); // NOI18N
        jPanel101.setPreferredSize(new java.awt.Dimension(100, 162));

        javax.swing.GroupLayout jPanel101Layout = new javax.swing.GroupLayout(jPanel101);
        jPanel101.setLayout(jPanel101Layout);
        jPanel101Layout.setHorizontalGroup(
            jPanel101Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel101Layout.setVerticalGroup(
            jPanel101Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 221, Short.MAX_VALUE)
        );

        jPanel6.add(jPanel101, java.awt.BorderLayout.LINE_START);

        jPanel102.setName("jPanel102"); // NOI18N
        jPanel102.setPreferredSize(new java.awt.Dimension(100, 164));

        javax.swing.GroupLayout jPanel102Layout = new javax.swing.GroupLayout(jPanel102);
        jPanel102.setLayout(jPanel102Layout);
        jPanel102Layout.setHorizontalGroup(
            jPanel102Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel102Layout.setVerticalGroup(
            jPanel102Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 221, Short.MAX_VALUE)
        );

        jPanel6.add(jPanel102, java.awt.BorderLayout.LINE_END);

        jPanel103.setName("jPanel103"); // NOI18N
        jPanel103.setLayout(new java.awt.BorderLayout());

        jPanel104.setName("jPanel104"); // NOI18N
        jPanel104.setLayout(new java.awt.GridLayout(7, 1, 3, 3));

        jPanel113.setName("jPanel113"); // NOI18N

        javax.swing.GroupLayout jPanel113Layout = new javax.swing.GroupLayout(jPanel113);
        jPanel113.setLayout(jPanel113Layout);
        jPanel113Layout.setHorizontalGroup(
            jPanel113Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel113Layout.setVerticalGroup(
            jPanel113Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel104.add(jPanel113);

        jPanel114.setName("jPanel114"); // NOI18N
        jPanel114.setLayout(new java.awt.BorderLayout());

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N
        jPanel114.add(jLabel15, java.awt.BorderLayout.CENTER);

        jPanel104.add(jPanel114);

        jPanel115.setName("jPanel115"); // NOI18N
        jPanel115.setLayout(new java.awt.BorderLayout());

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N
        jPanel115.add(jLabel16, java.awt.BorderLayout.CENTER);

        jPanel104.add(jPanel115);

        jPanel116.setName("jPanel116"); // NOI18N
        jPanel116.setLayout(new java.awt.BorderLayout());

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N
        jPanel116.add(jLabel17, java.awt.BorderLayout.CENTER);

        jPanel104.add(jPanel116);

        jPanel117.setName("jPanel117"); // NOI18N

        javax.swing.GroupLayout jPanel117Layout = new javax.swing.GroupLayout(jPanel117);
        jPanel117.setLayout(jPanel117Layout);
        jPanel117Layout.setHorizontalGroup(
            jPanel117Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel117Layout.setVerticalGroup(
            jPanel117Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel104.add(jPanel117);

        jPanel118.setName("jPanel118"); // NOI18N

        javax.swing.GroupLayout jPanel118Layout = new javax.swing.GroupLayout(jPanel118);
        jPanel118.setLayout(jPanel118Layout);
        jPanel118Layout.setHorizontalGroup(
            jPanel118Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel118Layout.setVerticalGroup(
            jPanel118Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel104.add(jPanel118);

        jPanel119.setName("jPanel119"); // NOI18N

        javax.swing.GroupLayout jPanel119Layout = new javax.swing.GroupLayout(jPanel119);
        jPanel119.setLayout(jPanel119Layout);
        jPanel119Layout.setHorizontalGroup(
            jPanel119Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel119Layout.setVerticalGroup(
            jPanel119Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel104.add(jPanel119);

        jPanel103.add(jPanel104, java.awt.BorderLayout.LINE_START);

        jPanel105.setName("jPanel105"); // NOI18N
        jPanel105.setLayout(new java.awt.BorderLayout());

        jPanel106.setName("jPanel106"); // NOI18N
        jPanel106.setPreferredSize(new java.awt.Dimension(275, 30));
        jPanel106.setLayout(new java.awt.BorderLayout());

        jPanel122.setName("jPanel122"); // NOI18N
        jPanel122.setLayout(new java.awt.BorderLayout());

        jPanel123.setName("jPanel123"); // NOI18N
        jPanel123.setPreferredSize(new java.awt.Dimension(115, 30));
        jPanel123.setLayout(new java.awt.BorderLayout());

        jButton13.setIcon(resourceMap.getIcon("jButton13.icon")); // NOI18N
        jButton13.setText(resourceMap.getString("jButton13.text")); // NOI18N
        jButton13.setName("jButton13"); // NOI18N
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });
        jPanel123.add(jButton13, java.awt.BorderLayout.CENTER);

        jPanel122.add(jPanel123, java.awt.BorderLayout.LINE_START);

        jPanel124.setName("jPanel124"); // NOI18N
        jPanel124.setPreferredSize(new java.awt.Dimension(115, 30));
        jPanel124.setLayout(new java.awt.BorderLayout());

        jButton14.setIcon(resourceMap.getIcon("jButton14.icon")); // NOI18N
        jButton14.setText(resourceMap.getString("jButton14.text")); // NOI18N
        jButton14.setName("jButton14"); // NOI18N
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });
        jPanel124.add(jButton14, java.awt.BorderLayout.CENTER);

        jPanel122.add(jPanel124, java.awt.BorderLayout.LINE_END);

        jPanel106.add(jPanel122, java.awt.BorderLayout.CENTER);

        jPanel105.add(jPanel106, java.awt.BorderLayout.PAGE_END);

        jPanel107.setName("jPanel107"); // NOI18N
        jPanel107.setLayout(new java.awt.GridLayout(2, 1, 3, 3));

        jPanel108.setName("jPanel108"); // NOI18N
        jPanel108.setLayout(new java.awt.GridLayout(3, 1, 3, 3));

        jPanel110.setName("jPanel110"); // NOI18N

        javax.swing.GroupLayout jPanel110Layout = new javax.swing.GroupLayout(jPanel110);
        jPanel110.setLayout(jPanel110Layout);
        jPanel110Layout.setHorizontalGroup(
            jPanel110Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 245, Short.MAX_VALUE)
        );
        jPanel110Layout.setVerticalGroup(
            jPanel110Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel108.add(jPanel110);

        jPanel111.setName("jPanel111"); // NOI18N
        jPanel111.setLayout(new java.awt.BorderLayout());

        jTextFieldprice.setText(resourceMap.getString("jTextFieldprice.text")); // NOI18N
        jTextFieldprice.setName("jTextFieldprice"); // NOI18N
        jTextFieldprice.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldpriceMouseClicked(evt);
            }
        });
        jPanel111.add(jTextFieldprice, java.awt.BorderLayout.CENTER);

        jPanel108.add(jPanel111);

        jPanel112.setName("jPanel112"); // NOI18N
        jPanel112.setLayout(new java.awt.BorderLayout());

        jTextFieldquantity.setText(resourceMap.getString("jTextFieldquantity.text")); // NOI18N
        jTextFieldquantity.setName("jTextFieldquantity"); // NOI18N
        jTextFieldquantity.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldquantityMouseClicked(evt);
            }
        });
        jPanel112.add(jTextFieldquantity, java.awt.BorderLayout.CENTER);

        jPanel108.add(jPanel112);

        jPanel107.add(jPanel108);

        jPanel109.setName("jPanel109"); // NOI18N
        jPanel109.setLayout(new java.awt.BorderLayout());

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jTextAreadesription.setColumns(20);
        jTextAreadesription.setRows(5);
        jTextAreadesription.setName("jTextAreadesription"); // NOI18N
        jScrollPane3.setViewportView(jTextAreadesription);

        jPanel109.add(jScrollPane3, java.awt.BorderLayout.CENTER);

        jPanel107.add(jPanel109);

        jPanel105.add(jPanel107, java.awt.BorderLayout.CENTER);

        jPanel103.add(jPanel105, java.awt.BorderLayout.CENTER);

        jPanel6.add(jPanel103, java.awt.BorderLayout.CENTER);

        jTabbedPane2.addTab(resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

        jPanel98.setName("jPanel98"); // NOI18N
        jPanel98.setLayout(new java.awt.BorderLayout());

        jPanel125.setName("jPanel125"); // NOI18N
        jPanel125.setPreferredSize(new java.awt.Dimension(330, 206));
        jPanel125.setLayout(new java.awt.BorderLayout());

        jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N
        jPanel125.add(jLabel18, java.awt.BorderLayout.PAGE_START);

        jPanel127.setName("jPanel127"); // NOI18N
        jPanel127.setLayout(new java.awt.BorderLayout());

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jTabledetailpurcharbill.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTabledetailpurcharbill.setName("jTabledetailpurcharbill"); // NOI18N
        jTabledetailpurcharbill.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTabledetailpurcharbillMouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(jTabledetailpurcharbill);

        jPanel127.add(jScrollPane4, java.awt.BorderLayout.CENTER);

        jPanel125.add(jPanel127, java.awt.BorderLayout.CENTER);

        jPanel98.add(jPanel125, java.awt.BorderLayout.LINE_START);

        jPanel126.setName("jPanel126"); // NOI18N
        jPanel126.setLayout(new java.awt.BorderLayout());

        jPanel128.setName("jPanel128"); // NOI18N
        jPanel128.setPreferredSize(new java.awt.Dimension(80, 206));
        jPanel128.setLayout(new java.awt.BorderLayout());

        jPanel132.setName("jPanel132"); // NOI18N
        jPanel132.setPreferredSize(new java.awt.Dimension(60, 30));

        javax.swing.GroupLayout jPanel132Layout = new javax.swing.GroupLayout(jPanel132);
        jPanel132.setLayout(jPanel132Layout);
        jPanel132Layout.setHorizontalGroup(
            jPanel132Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 80, Short.MAX_VALUE)
        );
        jPanel132Layout.setVerticalGroup(
            jPanel132Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel128.add(jPanel132, java.awt.BorderLayout.PAGE_END);

        jPanel133.setName("jPanel133"); // NOI18N
        jPanel133.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel138.setName("jPanel138"); // NOI18N
        jPanel138.setLayout(new java.awt.BorderLayout());

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N
        jPanel138.add(jLabel20, java.awt.BorderLayout.CENTER);

        jPanel133.add(jPanel138);

        jPanel139.setName("jPanel139"); // NOI18N
        jPanel139.setLayout(new java.awt.BorderLayout());

        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N
        jPanel139.add(jLabel21, java.awt.BorderLayout.CENTER);

        jPanel133.add(jPanel139);

        jPanel140.setName("jPanel140"); // NOI18N
        jPanel140.setLayout(new java.awt.BorderLayout());

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N
        jPanel140.add(jLabel22, java.awt.BorderLayout.CENTER);

        jPanel133.add(jPanel140);

        jPanel141.setName("jPanel141"); // NOI18N
        jPanel141.setLayout(new java.awt.BorderLayout());

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N
        jPanel141.add(jLabel23, java.awt.BorderLayout.PAGE_END);

        jPanel133.add(jPanel141);

        jPanel146.setName("jPanel146"); // NOI18N

        javax.swing.GroupLayout jPanel146Layout = new javax.swing.GroupLayout(jPanel146);
        jPanel146.setLayout(jPanel146Layout);
        jPanel146Layout.setHorizontalGroup(
            jPanel146Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 80, Short.MAX_VALUE)
        );
        jPanel146Layout.setVerticalGroup(
            jPanel146Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 29, Short.MAX_VALUE)
        );

        jPanel133.add(jPanel146);

        jPanel128.add(jPanel133, java.awt.BorderLayout.CENTER);

        jPanel126.add(jPanel128, java.awt.BorderLayout.LINE_START);

        jPanel129.setName("jPanel129"); // NOI18N
        jPanel129.setLayout(new java.awt.BorderLayout());

        jPanel131.setName("jPanel131"); // NOI18N
        jPanel131.setLayout(new java.awt.GridLayout(2, 1, 3, 3));

        jPanel134.setName("jPanel134"); // NOI18N
        jPanel134.setLayout(new java.awt.GridLayout(3, 1, 3, 3));

        jPanel136.setName("jPanel136"); // NOI18N
        jPanel136.setLayout(new java.awt.BorderLayout());

        jTextField1prd.setText(resourceMap.getString("jTextField1prd.text")); // NOI18N
        jTextField1prd.setName("jTextField1prd"); // NOI18N
        jPanel136.add(jTextField1prd, java.awt.BorderLayout.CENTER);

        jPanel134.add(jPanel136);

        jPanel137.setName("jPanel137"); // NOI18N
        jPanel137.setLayout(new java.awt.BorderLayout());

        jTextFieldpr.setText(resourceMap.getString("jTextFieldpr.text")); // NOI18N
        jTextFieldpr.setName("jTextFieldpr"); // NOI18N
        jPanel137.add(jTextFieldpr, java.awt.BorderLayout.CENTER);

        jPanel134.add(jPanel137);

        jPanel142.setName("jPanel142"); // NOI18N
        jPanel142.setLayout(new java.awt.BorderLayout());

        jTextFieldqt.setText(resourceMap.getString("jTextFieldqt.text")); // NOI18N
        jTextFieldqt.setName("jTextFieldqt"); // NOI18N
        jPanel142.add(jTextFieldqt, java.awt.BorderLayout.CENTER);

        jPanel134.add(jPanel142);

        jPanel131.add(jPanel134);

        jPanel135.setName("jPanel135"); // NOI18N
        jPanel135.setLayout(new java.awt.BorderLayout());

        jScrollPane5.setName("jScrollPane5"); // NOI18N

        jTextAreadet.setColumns(20);
        jTextAreadet.setRows(5);
        jTextAreadet.setName("jTextAreadet"); // NOI18N
        jScrollPane5.setViewportView(jTextAreadet);

        jPanel135.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        jPanel131.add(jPanel135);

        jPanel129.add(jPanel131, java.awt.BorderLayout.CENTER);

        jPanel126.add(jPanel129, java.awt.BorderLayout.CENTER);

        jPanel98.add(jPanel126, java.awt.BorderLayout.CENTER);

        jTabbedPane2.addTab(resourceMap.getString("jPanel98.TabConstraints.tabTitle"), jPanel98); // NOI18N

        jPanel99.setName("jPanel99"); // NOI18N

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        javax.swing.GroupLayout jPanel99Layout = new javax.swing.GroupLayout(jPanel99);
        jPanel99.setLayout(jPanel99Layout);
        jPanel99Layout.setHorizontalGroup(
            jPanel99Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel99Layout.createSequentialGroup()
                .addGap(203, 203, 203)
                .addComponent(jLabel19)
                .addContainerGap(302, Short.MAX_VALUE))
        );
        jPanel99Layout.setVerticalGroup(
            jPanel99Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel99Layout.createSequentialGroup()
                .addGap(72, 72, 72)
                .addComponent(jLabel19)
                .addContainerGap(135, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel99.TabConstraints.tabTitle"), jPanel99); // NOI18N

        jPanel100.setName("jPanel100"); // NOI18N
        jPanel100.setLayout(new java.awt.BorderLayout());

        jPanel148.setName("jPanel148"); // NOI18N

        javax.swing.GroupLayout jPanel148Layout = new javax.swing.GroupLayout(jPanel148);
        jPanel148.setLayout(jPanel148Layout);
        jPanel148Layout.setHorizontalGroup(
            jPanel148Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel148Layout.setVerticalGroup(
            jPanel148Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 221, Short.MAX_VALUE)
        );

        jPanel100.add(jPanel148, java.awt.BorderLayout.LINE_START);

        jPanel149.setName("jPanel149"); // NOI18N

        javax.swing.GroupLayout jPanel149Layout = new javax.swing.GroupLayout(jPanel149);
        jPanel149.setLayout(jPanel149Layout);
        jPanel149Layout.setHorizontalGroup(
            jPanel149Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel149Layout.setVerticalGroup(
            jPanel149Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 221, Short.MAX_VALUE)
        );

        jPanel100.add(jPanel149, java.awt.BorderLayout.LINE_END);

        jPanel150.setName("jPanel150"); // NOI18N
        jPanel150.setLayout(new java.awt.BorderLayout());

        jPanel151.setName("jPanel151"); // NOI18N
        jPanel151.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel160.setName("jPanel160"); // NOI18N

        javax.swing.GroupLayout jPanel160Layout = new javax.swing.GroupLayout(jPanel160);
        jPanel160.setLayout(jPanel160Layout);
        jPanel160Layout.setHorizontalGroup(
            jPanel160Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 110, Short.MAX_VALUE)
        );
        jPanel160Layout.setVerticalGroup(
            jPanel160Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 34, Short.MAX_VALUE)
        );

        jPanel151.add(jPanel160);

        jPanel161.setName("jPanel161"); // NOI18N
        jPanel161.setLayout(new java.awt.BorderLayout());

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N
        jPanel161.add(jLabel12, java.awt.BorderLayout.CENTER);

        jPanel151.add(jPanel161);

        jPanel162.setName("jPanel162"); // NOI18N
        jPanel162.setLayout(new java.awt.BorderLayout());

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N
        jPanel162.add(jLabel24, java.awt.BorderLayout.CENTER);

        jPanel151.add(jPanel162);

        jPanel163.setName("jPanel163"); // NOI18N
        jPanel163.setLayout(new java.awt.BorderLayout());

        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N
        jPanel163.add(jLabel25, java.awt.BorderLayout.CENTER);

        jPanel151.add(jPanel163);

        jPanel164.setName("jPanel164"); // NOI18N
        jPanel164.setLayout(new java.awt.BorderLayout());

        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
        jLabel26.setName("jLabel26"); // NOI18N
        jPanel164.add(jLabel26, java.awt.BorderLayout.CENTER);

        jPanel151.add(jPanel164);

        jPanel165.setName("jPanel165"); // NOI18N

        javax.swing.GroupLayout jPanel165Layout = new javax.swing.GroupLayout(jPanel165);
        jPanel165.setLayout(jPanel165Layout);
        jPanel165Layout.setHorizontalGroup(
            jPanel165Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 110, Short.MAX_VALUE)
        );
        jPanel165Layout.setVerticalGroup(
            jPanel165Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 34, Short.MAX_VALUE)
        );

        jPanel151.add(jPanel165);

        jPanel150.add(jPanel151, java.awt.BorderLayout.LINE_START);

        jPanel152.setName("jPanel152"); // NOI18N
        jPanel152.setLayout(new java.awt.GridLayout(6, 1, 3, 3));

        jPanel153.setName("jPanel153"); // NOI18N

        javax.swing.GroupLayout jPanel153Layout = new javax.swing.GroupLayout(jPanel153);
        jPanel153.setLayout(jPanel153Layout);
        jPanel153Layout.setHorizontalGroup(
            jPanel153Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 235, Short.MAX_VALUE)
        );
        jPanel153Layout.setVerticalGroup(
            jPanel153Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 34, Short.MAX_VALUE)
        );

        jPanel152.add(jPanel153);

        jPanel154.setName("jPanel154"); // NOI18N
        jPanel154.setLayout(new java.awt.BorderLayout());

        jTextFieldvendername.setText(resourceMap.getString("jTextFieldvendername.text")); // NOI18N
        jTextFieldvendername.setName("jTextFieldvendername"); // NOI18N
        jTextFieldvendername.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldvendernameMouseClicked(evt);
            }
        });
        jPanel154.add(jTextFieldvendername, java.awt.BorderLayout.CENTER);

        jPanel152.add(jPanel154);

        jPanel155.setName("jPanel155"); // NOI18N
        jPanel155.setLayout(new java.awt.BorderLayout());

        jTextFieldaddress.setText(resourceMap.getString("jTextFieldaddress.text")); // NOI18N
        jTextFieldaddress.setName("jTextFieldaddress"); // NOI18N
        jTextFieldaddress.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldaddressMouseClicked(evt);
            }
        });
        jTextFieldaddress.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldaddressActionPerformed(evt);
            }
        });
        jPanel155.add(jTextFieldaddress, java.awt.BorderLayout.CENTER);

        jPanel152.add(jPanel155);

        jPanel156.setName("jPanel156"); // NOI18N
        jPanel156.setLayout(new java.awt.BorderLayout());

        jTextFieldemail.setText(resourceMap.getString("jTextFieldemail.text")); // NOI18N
        jTextFieldemail.setName("jTextFieldemail"); // NOI18N
        jTextFieldemail.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldemailMouseClicked(evt);
            }
        });
        jTextFieldemail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldemailActionPerformed(evt);
            }
        });
        jPanel156.add(jTextFieldemail, java.awt.BorderLayout.CENTER);

        jPanel152.add(jPanel156);

        jPanel159.setName("jPanel159"); // NOI18N
        jPanel159.setLayout(new java.awt.BorderLayout());

        jTextFieldphone.setText(resourceMap.getString("jTextFieldphone.text")); // NOI18N
        jTextFieldphone.setName("jTextFieldphone"); // NOI18N
        jTextFieldphone.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldphoneMouseClicked(evt);
            }
        });
        jPanel159.add(jTextFieldphone, java.awt.BorderLayout.CENTER);

        jPanel152.add(jPanel159);

        jPanel157.setName("jPanel157"); // NOI18N
        jPanel157.setLayout(new java.awt.BorderLayout());

        jPanel167.setName("jPanel167"); // NOI18N
        jPanel167.setPreferredSize(new java.awt.Dimension(110, 26));
        jPanel167.setLayout(new java.awt.BorderLayout());

        jButton16.setIcon(resourceMap.getIcon("jButton16.icon")); // NOI18N
        jButton16.setText(resourceMap.getString("jButton16.text")); // NOI18N
        jButton16.setName("jButton16"); // NOI18N
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });
        jPanel167.add(jButton16, java.awt.BorderLayout.CENTER);

        jPanel157.add(jPanel167, java.awt.BorderLayout.LINE_START);

        jPanel168.setName("jPanel168"); // NOI18N
        jPanel168.setPreferredSize(new java.awt.Dimension(110, 26));
        jPanel168.setLayout(new java.awt.BorderLayout());

        jButton19.setIcon(resourceMap.getIcon("jButton19.icon")); // NOI18N
        jButton19.setText(resourceMap.getString("jButton19.text")); // NOI18N
        jButton19.setName("jButton19"); // NOI18N
        jButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton19ActionPerformed(evt);
            }
        });
        jPanel168.add(jButton19, java.awt.BorderLayout.CENTER);

        jPanel157.add(jPanel168, java.awt.BorderLayout.LINE_END);

        jPanel169.setName("jPanel169"); // NOI18N
        jPanel169.setLayout(new java.awt.BorderLayout());
        jPanel157.add(jPanel169, java.awt.BorderLayout.CENTER);

        jPanel152.add(jPanel157);

        jPanel150.add(jPanel152, java.awt.BorderLayout.CENTER);

        jPanel100.add(jPanel150, java.awt.BorderLayout.CENTER);

        jTabbedPane2.addTab(resourceMap.getString("jPanel100.TabConstraints.tabTitle"), jPanel100); // NOI18N

        jPanel5.add(jTabbedPane2, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel5, java.awt.BorderLayout.LINE_END);

        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setLayout(new java.awt.BorderLayout());

        jPanel8.setName("jPanel8"); // NOI18N
        jPanel8.setLayout(new java.awt.GridLayout(7, 1, 4, 4));

        jPanel10.setName("jPanel10"); // NOI18N
        jPanel10.setLayout(new java.awt.BorderLayout());

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jPanel10.add(jLabel1, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel10);

        jPanel11.setName("jPanel11"); // NOI18N
        jPanel11.setLayout(new java.awt.BorderLayout());

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        jPanel11.add(jLabel3, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel11);

        jPanel12.setName("jPanel12"); // NOI18N
        jPanel12.setLayout(new java.awt.BorderLayout());

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N
        jPanel12.add(jLabel4, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel12);

        jPanel13.setName("jPanel13"); // NOI18N
        jPanel13.setLayout(new java.awt.BorderLayout());

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N
        jPanel13.add(jLabel5, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel13);

        jPanel14.setName("jPanel14"); // NOI18N
        jPanel14.setLayout(new java.awt.BorderLayout());

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N
        jPanel14.add(jLabel6, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel14);

        jPanel15.setName("jPanel15"); // NOI18N
        jPanel15.setLayout(new java.awt.BorderLayout());

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N
        jPanel15.add(jLabel7, java.awt.BorderLayout.CENTER);

        jPanel8.add(jPanel15);

        jPanel16.setName("jPanel16"); // NOI18N
        jPanel16.setLayout(new java.awt.BorderLayout());
        jPanel8.add(jPanel16);

        jPanel7.add(jPanel8, java.awt.BorderLayout.LINE_START);

        jPanel9.setName("jPanel9"); // NOI18N
        jPanel9.setLayout(new java.awt.GridLayout(7, 1, 3, 3));

        jPanel17.setName("jPanel17"); // NOI18N
        jPanel17.setLayout(new java.awt.BorderLayout());

        jTextFieldbillname.setText(resourceMap.getString("jTextFieldbillname.text")); // NOI18N
        jTextFieldbillname.setName("jTextFieldbillname"); // NOI18N
        jTextFieldbillname.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldbillnameMouseClicked(evt);
            }
        });
        jPanel17.add(jTextFieldbillname, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel17);

        jPanel18.setName("jPanel18"); // NOI18N
        jPanel18.setLayout(new java.awt.BorderLayout());

        jPanel145.setName("jPanel145"); // NOI18N
        jPanel145.setLayout(new java.awt.BorderLayout());

        jButton18.setIcon(resourceMap.getIcon("jButton18.icon")); // NOI18N
        jButton18.setText(resourceMap.getString("jButton18.text")); // NOI18N
        jButton18.setName("jButton18"); // NOI18N
        jButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton18ActionPerformed(evt);
            }
        });
        jPanel145.add(jButton18, java.awt.BorderLayout.CENTER);

        jPanel18.add(jPanel145, java.awt.BorderLayout.LINE_END);

        jPanel147.setName("jPanel147"); // NOI18N
        jPanel147.setLayout(new java.awt.BorderLayout());

        jComboBoxvender1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select" }));
        jComboBoxvender1.setName("jComboBoxvender1"); // NOI18N
        jComboBoxvender1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxvender1ActionPerformed(evt);
            }
        });
        jPanel147.add(jComboBoxvender1, java.awt.BorderLayout.CENTER);

        jPanel18.add(jPanel147, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel18);

        jPanel19.setName("jPanel19"); // NOI18N
        jPanel19.setLayout(new java.awt.BorderLayout());

        jCalendarCombobuildate.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select" }));
        jCalendarCombobuildate.setName("jCalendarCombobuildate"); // NOI18N
        jCalendarCombobuildate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCalendarCombobuildateActionPerformed(evt);
            }
        });
        jPanel19.add(jCalendarCombobuildate, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel19);

        jPanel21.setName("jPanel21"); // NOI18N
        jPanel21.setLayout(new java.awt.BorderLayout());

        jComboBoxaccname1.setName("jComboBoxaccname1"); // NOI18N
        jComboBoxaccname1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxaccname1ActionPerformed(evt);
            }
        });
        jPanel21.add(jComboBoxaccname1, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel21);

        jPanel22.setName("jPanel22"); // NOI18N
        jPanel22.setLayout(new java.awt.BorderLayout());

        jPanel91.setName("jPanel91"); // NOI18N
        jPanel91.setPreferredSize(new java.awt.Dimension(111, 24));
        jPanel91.setLayout(new java.awt.BorderLayout());

        state.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select", "Paid", "Unpaid" }));
        state.setName("state"); // NOI18N
        state.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                stateActionPerformed(evt);
            }
        });
        jPanel91.add(state, java.awt.BorderLayout.CENTER);

        jPanel22.add(jPanel91, java.awt.BorderLayout.LINE_START);

        jPanel92.setName("jPanel92"); // NOI18N
        jPanel92.setLayout(new java.awt.BorderLayout());

        jPanel93.setName("jPanel93"); // NOI18N
        jPanel93.setPreferredSize(new java.awt.Dimension(55, 55));
        jPanel93.setLayout(new java.awt.BorderLayout());

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N
        jPanel93.add(jLabel14, java.awt.BorderLayout.CENTER);

        jPanel92.add(jPanel93, java.awt.BorderLayout.LINE_START);

        jPanel94.setName("jPanel94"); // NOI18N
        jPanel94.setLayout(new java.awt.BorderLayout());

        jPanel95.setName("jPanel95"); // NOI18N
        jPanel95.setPreferredSize(new java.awt.Dimension(55, 60));
        jPanel95.setLayout(new java.awt.BorderLayout());

        jTextFieldtotal.setName("jTextFieldtotal"); // NOI18N
        jTextFieldtotal.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextFieldtotalMouseClicked(evt);
            }
        });
        jPanel95.add(jTextFieldtotal, java.awt.BorderLayout.CENTER);

        jPanel94.add(jPanel95, java.awt.BorderLayout.LINE_START);

        jPanel97.setName("jPanel97"); // NOI18N
        jPanel97.setPreferredSize(new java.awt.Dimension(62, 24));
        jPanel97.setLayout(new java.awt.BorderLayout());

        jComboBoxunit.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Select", "VND", "USD" }));
        jComboBoxunit.setName("jComboBoxunit"); // NOI18N
        jPanel97.add(jComboBoxunit, java.awt.BorderLayout.CENTER);

        jPanel94.add(jPanel97, java.awt.BorderLayout.LINE_END);

        jPanel92.add(jPanel94, java.awt.BorderLayout.CENTER);

        jPanel22.add(jPanel92, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel22);

        jPanel23.setName("jPanel23"); // NOI18N
        jPanel23.setLayout(new java.awt.BorderLayout());

        jPanel143.setName("jPanel143"); // NOI18N
        jPanel143.setLayout(new java.awt.BorderLayout());

        jButton17.setIcon(resourceMap.getIcon("jButton17.icon")); // NOI18N
        jButton17.setText(resourceMap.getString("jButton17.text")); // NOI18N
        jButton17.setName("jButton17"); // NOI18N
        jButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton17ActionPerformed(evt);
            }
        });
        jPanel143.add(jButton17, java.awt.BorderLayout.CENTER);

        jPanel23.add(jPanel143, java.awt.BorderLayout.LINE_END);

        jPanel144.setName("jPanel144"); // NOI18N
        jPanel144.setLayout(new java.awt.BorderLayout());

        jComboBoxproduct1.setName("jComboBoxproduct1"); // NOI18N
        jComboBoxproduct1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxproduct1ActionPerformed(evt);
            }
        });
        jPanel144.add(jComboBoxproduct1, java.awt.BorderLayout.CENTER);

        jPanel23.add(jPanel144, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel23);

        jPanel24.setName("jPanel24"); // NOI18N
        jPanel24.setLayout(new java.awt.BorderLayout());

        jPanel25.setName("jPanel25"); // NOI18N
        jPanel25.setPreferredSize(new java.awt.Dimension(70, 70));
        jPanel25.setLayout(new java.awt.BorderLayout());

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel25.add(jButton1, java.awt.BorderLayout.CENTER);

        jPanel24.add(jPanel25, java.awt.BorderLayout.LINE_START);

        jPanel26.setName("jPanel26"); // NOI18N
        jPanel26.setLayout(new java.awt.BorderLayout());

        jPanel28.setName("jPanel28"); // NOI18N
        jPanel28.setPreferredSize(new java.awt.Dimension(70, 24));
        jPanel28.setLayout(new java.awt.BorderLayout());

        jButton2.setIcon(resourceMap.getIcon("jButton2.icon")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel28.add(jButton2, java.awt.BorderLayout.CENTER);

        jPanel26.add(jPanel28, java.awt.BorderLayout.LINE_START);

        jPanel29.setName("jPanel29"); // NOI18N
        jPanel29.setLayout(new java.awt.BorderLayout());

        jPanel30.setName("jPanel30"); // NOI18N
        jPanel30.setPreferredSize(new java.awt.Dimension(65, 24));
        jPanel30.setLayout(new java.awt.BorderLayout());

        jButton4.setIcon(resourceMap.getIcon("jButton4.icon")); // NOI18N
        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        jPanel30.add(jButton4, java.awt.BorderLayout.CENTER);

        jPanel29.add(jPanel30, java.awt.BorderLayout.LINE_START);

        jPanel57.setName("jPanel57"); // NOI18N
        jPanel57.setLayout(new java.awt.BorderLayout());

        jButton6.setIcon(resourceMap.getIcon("jButton6.icon")); // NOI18N
        jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
        jButton6.setName("jButton6"); // NOI18N
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });
        jPanel57.add(jButton6, java.awt.BorderLayout.CENTER);

        jPanel29.add(jPanel57, java.awt.BorderLayout.CENTER);

        jPanel26.add(jPanel29, java.awt.BorderLayout.CENTER);

        jPanel24.add(jPanel26, java.awt.BorderLayout.CENTER);

        jPanel9.add(jPanel24);

        jPanel7.add(jPanel9, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel7, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel3);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel4.border.border.lineColor"), 2), resourceMap.getString("jPanel4.border.title"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setLayout(new java.awt.BorderLayout());

        jPanel71.setName("jPanel71"); // NOI18N
        jPanel71.setPreferredSize(new java.awt.Dimension(946, 30));
        jPanel71.setLayout(new java.awt.BorderLayout());

        jPanel73.setName("jPanel73"); // NOI18N
        jPanel73.setPreferredSize(new java.awt.Dimension(240, 30));
        jPanel73.setLayout(new java.awt.BorderLayout());

        jPanel81.setName("jPanel81"); // NOI18N
        jPanel81.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel81.setLayout(new java.awt.BorderLayout());

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N
        jPanel81.add(jLabel8, java.awt.BorderLayout.CENTER);

        jPanel73.add(jPanel81, java.awt.BorderLayout.LINE_END);

        jPanel71.add(jPanel73, java.awt.BorderLayout.LINE_END);

        jPanel74.setName("jPanel74"); // NOI18N
        jPanel74.setPreferredSize(new java.awt.Dimension(250, 30));

        javax.swing.GroupLayout jPanel74Layout = new javax.swing.GroupLayout(jPanel74);
        jPanel74.setLayout(jPanel74Layout);
        jPanel74Layout.setHorizontalGroup(
            jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );
        jPanel74Layout.setVerticalGroup(
            jPanel74Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel71.add(jPanel74, java.awt.BorderLayout.LINE_START);

        jPanel75.setName("jPanel75"); // NOI18N
        jPanel75.setLayout(new java.awt.BorderLayout());

        jPanel76.setName("jPanel76"); // NOI18N
        jPanel76.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel76.setLayout(new java.awt.BorderLayout());

        jButton7.setIcon(resourceMap.getIcon("jButton7.icon")); // NOI18N
        jButton7.setText(resourceMap.getString("jButton7.text")); // NOI18N
        jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        jButton7.setName("jButton7"); // NOI18N
        jPanel76.add(jButton7, java.awt.BorderLayout.CENTER);

        jPanel75.add(jPanel76, java.awt.BorderLayout.LINE_START);

        jPanel77.setName("jPanel77"); // NOI18N
        jPanel77.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel77.setLayout(new java.awt.BorderLayout());

        jButton9.setIcon(resourceMap.getIcon("jButton9.icon")); // NOI18N
        jButton9.setText(resourceMap.getString("jButton9.text")); // NOI18N
        jButton9.setName("jButton9"); // NOI18N
        jPanel77.add(jButton9, java.awt.BorderLayout.CENTER);

        jPanel75.add(jPanel77, java.awt.BorderLayout.LINE_END);

        jPanel78.setName("jPanel78"); // NOI18N
        jPanel78.setLayout(new java.awt.BorderLayout());

        jPanel79.setName("jPanel79"); // NOI18N
        jPanel79.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel79.setLayout(new java.awt.BorderLayout());

        jButton8.setIcon(resourceMap.getIcon("jButton8.icon")); // NOI18N
        jButton8.setText(resourceMap.getString("jButton8.text")); // NOI18N
        jButton8.setName("jButton8"); // NOI18N
        jPanel79.add(jButton8, java.awt.BorderLayout.CENTER);

        jPanel78.add(jPanel79, java.awt.BorderLayout.LINE_START);

        jPanel80.setName("jPanel80"); // NOI18N
        jPanel80.setLayout(new java.awt.BorderLayout());

        jTextField6.setText(resourceMap.getString("jTextField6.text")); // NOI18N
        jTextField6.setName("jTextField6"); // NOI18N
        jPanel80.add(jTextField6, java.awt.BorderLayout.CENTER);

        jPanel78.add(jPanel80, java.awt.BorderLayout.CENTER);

        jPanel75.add(jPanel78, java.awt.BorderLayout.CENTER);

        jPanel71.add(jPanel75, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel71, java.awt.BorderLayout.PAGE_END);

        jPanel72.setName("jPanel72"); // NOI18N
        jPanel72.setLayout(new java.awt.BorderLayout());

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTablepurchase.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTablepurchase.setName("jTablepurchase"); // NOI18N
        jTablepurchase.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTablepurchaseMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTablepurchase);

        jPanel72.add(jScrollPane1, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel72, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel4);

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N
        jPanel2.setLayout(new java.awt.GridLayout(2, 1, 4, 4));

        jPanel31.setBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel31.border.lineColor"), 3)); // NOI18N
        jPanel31.setName("jPanel31"); // NOI18N
        jPanel31.setLayout(new java.awt.BorderLayout());

        jPanel33.setName("jPanel33"); // NOI18N
        jPanel33.setPreferredSize(new java.awt.Dimension(250, 207));

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 271, Short.MAX_VALUE)
        );

        jPanel31.add(jPanel33, java.awt.BorderLayout.LINE_START);

        jPanel34.setName("jPanel34"); // NOI18N
        jPanel34.setPreferredSize(new java.awt.Dimension(250, 212));

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 271, Short.MAX_VALUE)
        );

        jPanel31.add(jPanel34, java.awt.BorderLayout.LINE_END);

        jPanel35.setName("jPanel35"); // NOI18N
        jPanel35.setLayout(new java.awt.BorderLayout());

        jPanel36.setName("jPanel36"); // NOI18N
        jPanel36.setLayout(new java.awt.GridLayout(8, 1, 4, 4));

        jPanel38.setName("jPanel38"); // NOI18N

        javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
        jPanel38.setLayout(jPanel38Layout);
        jPanel38Layout.setHorizontalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel38Layout.setVerticalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel36.add(jPanel38);

        jPanel39.setName("jPanel39"); // NOI18N

        javax.swing.GroupLayout jPanel39Layout = new javax.swing.GroupLayout(jPanel39);
        jPanel39.setLayout(jPanel39Layout);
        jPanel39Layout.setHorizontalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel39Layout.setVerticalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel36.add(jPanel39);

        jPanel40.setName("jPanel40"); // NOI18N
        jPanel40.setLayout(new java.awt.BorderLayout());

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N
        jPanel40.add(jLabel9, java.awt.BorderLayout.CENTER);

        jPanel36.add(jPanel40);

        jPanel41.setName("jPanel41"); // NOI18N
        jPanel41.setLayout(new java.awt.BorderLayout());

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N
        jPanel41.add(jLabel11, java.awt.BorderLayout.CENTER);

        jPanel36.add(jPanel41);

        jPanel42.setName("jPanel42"); // NOI18N
        jPanel42.setLayout(new java.awt.BorderLayout());
        jPanel36.add(jPanel42);

        jPanel43.setName("jPanel43"); // NOI18N

        javax.swing.GroupLayout jPanel43Layout = new javax.swing.GroupLayout(jPanel43);
        jPanel43.setLayout(jPanel43Layout);
        jPanel43Layout.setHorizontalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel43Layout.setVerticalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel36.add(jPanel43);

        jPanel44.setName("jPanel44"); // NOI18N

        javax.swing.GroupLayout jPanel44Layout = new javax.swing.GroupLayout(jPanel44);
        jPanel44.setLayout(jPanel44Layout);
        jPanel44Layout.setHorizontalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel44Layout.setVerticalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel36.add(jPanel44);

        jPanel45.setName("jPanel45"); // NOI18N

        javax.swing.GroupLayout jPanel45Layout = new javax.swing.GroupLayout(jPanel45);
        jPanel45.setLayout(jPanel45Layout);
        jPanel45Layout.setHorizontalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel45Layout.setVerticalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel36.add(jPanel45);

        jPanel35.add(jPanel36, java.awt.BorderLayout.LINE_START);

        jPanel37.setName("jPanel37"); // NOI18N
        jPanel37.setLayout(new java.awt.BorderLayout());

        jPanel46.setName("jPanel46"); // NOI18N
        jPanel46.setLayout(new java.awt.GridLayout(8, 1, 4, 4));

        jPanel56.setName("jPanel56"); // NOI18N

        javax.swing.GroupLayout jPanel56Layout = new javax.swing.GroupLayout(jPanel56);
        jPanel56.setLayout(jPanel56Layout);
        jPanel56Layout.setHorizontalGroup(
            jPanel56Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 151, Short.MAX_VALUE)
        );
        jPanel56Layout.setVerticalGroup(
            jPanel56Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel46.add(jPanel56);

        jPanel58.setName("jPanel58"); // NOI18N

        javax.swing.GroupLayout jPanel58Layout = new javax.swing.GroupLayout(jPanel58);
        jPanel58.setLayout(jPanel58Layout);
        jPanel58Layout.setHorizontalGroup(
            jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 151, Short.MAX_VALUE)
        );
        jPanel58Layout.setVerticalGroup(
            jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel46.add(jPanel58);

        jPanel59.setName("jPanel59"); // NOI18N
        jPanel59.setLayout(new java.awt.BorderLayout());

        jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
        jCheckBox1.setName("jCheckBox1"); // NOI18N
        jPanel59.add(jCheckBox1, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel59);

        jPanel60.setName("jPanel60"); // NOI18N
        jPanel60.setLayout(new java.awt.BorderLayout());

        jCheckBox2.setText(resourceMap.getString("jCheckBox2.text")); // NOI18N
        jCheckBox2.setName("jCheckBox2"); // NOI18N
        jPanel60.add(jCheckBox2, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel60);

        jPanel61.setName("jPanel61"); // NOI18N
        jPanel61.setLayout(new java.awt.BorderLayout());
        jPanel46.add(jPanel61);

        jPanel62.setName("jPanel62"); // NOI18N

        javax.swing.GroupLayout jPanel62Layout = new javax.swing.GroupLayout(jPanel62);
        jPanel62.setLayout(jPanel62Layout);
        jPanel62Layout.setHorizontalGroup(
            jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 151, Short.MAX_VALUE)
        );
        jPanel62Layout.setVerticalGroup(
            jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel46.add(jPanel62);

        jPanel64.setName("jPanel64"); // NOI18N

        javax.swing.GroupLayout jPanel64Layout = new javax.swing.GroupLayout(jPanel64);
        jPanel64.setLayout(jPanel64Layout);
        jPanel64Layout.setHorizontalGroup(
            jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 151, Short.MAX_VALUE)
        );
        jPanel64Layout.setVerticalGroup(
            jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel46.add(jPanel64);

        jPanel65.setName("jPanel65"); // NOI18N

        javax.swing.GroupLayout jPanel65Layout = new javax.swing.GroupLayout(jPanel65);
        jPanel65.setLayout(jPanel65Layout);
        jPanel65Layout.setHorizontalGroup(
            jPanel65Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 151, Short.MAX_VALUE)
        );
        jPanel65Layout.setVerticalGroup(
            jPanel65Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel46.add(jPanel65);

        jPanel37.add(jPanel46, java.awt.BorderLayout.LINE_END);

        jPanel47.setName("jPanel47"); // NOI18N
        jPanel47.setLayout(new java.awt.GridLayout(8, 1, 4, 4));

        jPanel48.setName("jPanel48"); // NOI18N

        javax.swing.GroupLayout jPanel48Layout = new javax.swing.GroupLayout(jPanel48);
        jPanel48.setLayout(jPanel48Layout);
        jPanel48Layout.setHorizontalGroup(
            jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 185, Short.MAX_VALUE)
        );
        jPanel48Layout.setVerticalGroup(
            jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel48);

        jPanel49.setName("jPanel49"); // NOI18N

        javax.swing.GroupLayout jPanel49Layout = new javax.swing.GroupLayout(jPanel49);
        jPanel49.setLayout(jPanel49Layout);
        jPanel49Layout.setHorizontalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 185, Short.MAX_VALUE)
        );
        jPanel49Layout.setVerticalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel49);

        jPanel50.setName("jPanel50"); // NOI18N
        jPanel50.setLayout(new java.awt.BorderLayout());

        jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N
        jTextField3.setName("jTextField3"); // NOI18N
        jPanel50.add(jTextField3, java.awt.BorderLayout.CENTER);

        jPanel47.add(jPanel50);

        jPanel51.setName("jPanel51"); // NOI18N
        jPanel51.setLayout(new java.awt.BorderLayout());

        jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jComboBox5.setName("jComboBox5"); // NOI18N
        jPanel51.add(jComboBox5, java.awt.BorderLayout.CENTER);

        jPanel47.add(jPanel51);

        jPanel52.setName("jPanel52"); // NOI18N
        jPanel52.setLayout(new java.awt.BorderLayout());
        jPanel47.add(jPanel52);

        jPanel53.setName("jPanel53"); // NOI18N
        jPanel53.setLayout(new java.awt.BorderLayout());

        jPanel66.setName("jPanel66"); // NOI18N
        jPanel66.setPreferredSize(new java.awt.Dimension(50, 23));

        javax.swing.GroupLayout jPanel66Layout = new javax.swing.GroupLayout(jPanel66);
        jPanel66.setLayout(jPanel66Layout);
        jPanel66Layout.setHorizontalGroup(
            jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel66Layout.setVerticalGroup(
            jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel53.add(jPanel66, java.awt.BorderLayout.LINE_START);

        jPanel67.setName("jPanel67"); // NOI18N
        jPanel67.setPreferredSize(new java.awt.Dimension(50, 23));

        javax.swing.GroupLayout jPanel67Layout = new javax.swing.GroupLayout(jPanel67);
        jPanel67.setLayout(jPanel67Layout);
        jPanel67Layout.setHorizontalGroup(
            jPanel67Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel67Layout.setVerticalGroup(
            jPanel67Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel53.add(jPanel67, java.awt.BorderLayout.LINE_END);

        jPanel68.setName("jPanel68"); // NOI18N
        jPanel68.setLayout(new java.awt.BorderLayout());

        jButton5.setIcon(resourceMap.getIcon("jButton5.icon")); // NOI18N
        jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
        jButton5.setName("jButton5"); // NOI18N
        jPanel68.add(jButton5, java.awt.BorderLayout.CENTER);

        jPanel53.add(jPanel68, java.awt.BorderLayout.CENTER);

        jPanel47.add(jPanel53);

        jPanel54.setName("jPanel54"); // NOI18N

        javax.swing.GroupLayout jPanel54Layout = new javax.swing.GroupLayout(jPanel54);
        jPanel54.setLayout(jPanel54Layout);
        jPanel54Layout.setHorizontalGroup(
            jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 185, Short.MAX_VALUE)
        );
        jPanel54Layout.setVerticalGroup(
            jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel54);

        jPanel55.setName("jPanel55"); // NOI18N

        javax.swing.GroupLayout jPanel55Layout = new javax.swing.GroupLayout(jPanel55);
        jPanel55.setLayout(jPanel55Layout);
        jPanel55Layout.setHorizontalGroup(
            jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 185, Short.MAX_VALUE)
        );
        jPanel55Layout.setVerticalGroup(
            jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel47.add(jPanel55);

        jPanel37.add(jPanel47, java.awt.BorderLayout.CENTER);

        jPanel35.add(jPanel37, java.awt.BorderLayout.CENTER);

        jPanel31.add(jPanel35, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel31);

        jPanel32.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("jPanel32.border.border.lineColor"), 2), resourceMap.getString("jPanel32.border.title"))); // NOI18N
        jPanel32.setName("jPanel32"); // NOI18N
        jPanel32.setLayout(new java.awt.BorderLayout());

        jPanel69.setName("jPanel69"); // NOI18N
        jPanel69.setPreferredSize(new java.awt.Dimension(946, 30));
        jPanel69.setLayout(new java.awt.BorderLayout());

        jPanel82.setName("jPanel82"); // NOI18N
        jPanel82.setPreferredSize(new java.awt.Dimension(240, 30));
        jPanel82.setLayout(new java.awt.BorderLayout());

        jPanel90.setName("jPanel90"); // NOI18N
        jPanel90.setPreferredSize(new java.awt.Dimension(50, 30));
        jPanel90.setLayout(new java.awt.BorderLayout());

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N
        jPanel90.add(jLabel13, java.awt.BorderLayout.CENTER);

        jPanel82.add(jPanel90, java.awt.BorderLayout.LINE_END);

        jPanel69.add(jPanel82, java.awt.BorderLayout.LINE_END);

        jPanel83.setName("jPanel83"); // NOI18N
        jPanel83.setPreferredSize(new java.awt.Dimension(250, 30));

        javax.swing.GroupLayout jPanel83Layout = new javax.swing.GroupLayout(jPanel83);
        jPanel83.setLayout(jPanel83Layout);
        jPanel83Layout.setHorizontalGroup(
            jPanel83Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 250, Short.MAX_VALUE)
        );
        jPanel83Layout.setVerticalGroup(
            jPanel83Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 30, Short.MAX_VALUE)
        );

        jPanel69.add(jPanel83, java.awt.BorderLayout.LINE_START);

        jPanel84.setName("jPanel84"); // NOI18N
        jPanel84.setLayout(new java.awt.BorderLayout());

        jPanel85.setName("jPanel85"); // NOI18N
        jPanel85.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel85.setLayout(new java.awt.BorderLayout());

        jButton10.setIcon(resourceMap.getIcon("jButton10.icon")); // NOI18N
        jButton10.setText(resourceMap.getString("jButton10.text")); // NOI18N
        jButton10.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        jButton10.setName("jButton10"); // NOI18N
        jPanel85.add(jButton10, java.awt.BorderLayout.CENTER);

        jPanel84.add(jPanel85, java.awt.BorderLayout.LINE_START);

        jPanel86.setName("jPanel86"); // NOI18N
        jPanel86.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel86.setLayout(new java.awt.BorderLayout());

        jButton12.setIcon(resourceMap.getIcon("jButton12.icon")); // NOI18N
        jButton12.setText(resourceMap.getString("jButton12.text")); // NOI18N
        jButton12.setName("jButton12"); // NOI18N
        jPanel86.add(jButton12, java.awt.BorderLayout.CENTER);

        jPanel84.add(jPanel86, java.awt.BorderLayout.LINE_END);

        jPanel87.setName("jPanel87"); // NOI18N
        jPanel87.setLayout(new java.awt.BorderLayout());

        jPanel88.setName("jPanel88"); // NOI18N
        jPanel88.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel88.setLayout(new java.awt.BorderLayout());

        jButton11.setIcon(resourceMap.getIcon("jButton11.icon")); // NOI18N
        jButton11.setText(resourceMap.getString("jButton11.text")); // NOI18N
        jButton11.setName("jButton11"); // NOI18N
        jPanel88.add(jButton11, java.awt.BorderLayout.CENTER);

        jPanel87.add(jPanel88, java.awt.BorderLayout.LINE_START);

        jPanel89.setName("jPanel89"); // NOI18N
        jPanel89.setPreferredSize(new java.awt.Dimension(110, 30));
        jPanel89.setLayout(new java.awt.BorderLayout());

        jTextField7.setText(resourceMap.getString("jTextField7.text")); // NOI18N
        jTextField7.setName("jTextField7"); // NOI18N
        jPanel89.add(jTextField7, java.awt.BorderLayout.CENTER);

        jPanel87.add(jPanel89, java.awt.BorderLayout.LINE_END);

        jPanel84.add(jPanel87, java.awt.BorderLayout.CENTER);

        jPanel69.add(jPanel84, java.awt.BorderLayout.CENTER);

        jPanel32.add(jPanel69, java.awt.BorderLayout.PAGE_END);

        jPanel70.setName("jPanel70"); // NOI18N
        jPanel70.setLayout(new java.awt.BorderLayout());

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTable2.setName("jTable2"); // NOI18N
        jScrollPane2.setViewportView(jTable2);

        jPanel70.add(jScrollPane2, java.awt.BorderLayout.CENTER);

        jPanel32.add(jPanel70, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel32);

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    public void datafromtablepurcharbill()
    {
        try {
            jTextFieldbillname.setText(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 1).toString());
            jComboBoxvender1.setSelectedItem(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 2).toString());
            
            jComboBoxaccname1.setSelectedItem(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 3).toString());
           
            String date=this.jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 4).toString(); 
            SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy");
            this.jCalendarCombobuildate.setDate(sdf.parse(date));
            
            
            state.setSelectedItem(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 5).toString());
            jComboBoxunit.setSelectedItem(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 6).toString());
            jTextFieldtotal.setText(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 7).toString());
        } 
            catch (ParseException ex) 
            {
            //Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
    }
     public void Createdetailpurchasebilltable()
    {
        try
        {
           Vector<String> cols =new Vector<String>();
          // cols.add("Billid");
          // cols.add("ProductId");
           cols.add("ProductName");
           cols.add("Price");
           cols.add("Quantity");
           cols.add("Description");
           DetailPurchaseBill dt=new DetailPurchaseBill();
           DefaultTableModel dc=new DefaultTableModel(dt.createtabledetailpurcharbill(),cols)
                    {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
            
        }; 
        this.jTabledetailpurcharbill.getTableHeader().setReorderingAllowed(false);
           jTabledetailpurcharbill.setModel(dc);
        }
        catch(Exception ex)
        {
            System.out.println(ex);
        }
    }
     public int getselectedpurchasebillid()
    {
         String s=this.jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 0).toString();
         int billid=Integer.valueOf(s) ;
         return billid;
         //return 0;
    }
     public void rfdt()
     {
         jTextField1prd.setText("");
         jTextFieldpr.setText("");
         jTextFieldqt.setText("");
         jTextAreadet.setText("");
     }
    private void jTablepurchaseMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTablepurchaseMouseClicked
        jButton1.setEnabled(false);
        jTabbedPane2.setVisible(true);
        jTabbedPane2.removeAll();
        jTabbedPane2.addTab("Detail PurchaseBill",  jPanel98);
        JPanel pn=new JPanel();
         jTabbedPane2.addTab("Add Detail PurchaseBill",  pn);
         JPanel pm=new JPanel();
         jTabbedPane2.addTab("New Product",  pm);
         JPanel pl=new JPanel();
         jTabbedPane2.addTab("New Vender",  pl);
        datafromtablepurcharbill();
        Createdetailpurchasebilltable();
        rfdt();
        jButton2.setEnabled(true);
        jButton4.setEnabled(true);
        Createcoboproduc1();
        jComboBoxproduct1.setEnabled(false);
        
        
    }//GEN-LAST:event_jTablepurchaseMouseClicked
    public void Updatepurchasebill()
    {
        try
        {
        PurchaseBill pc=new PurchaseBill();
        pc.setBillName(jTextFieldbillname.getText());
        int venderid=combovender.get(jComboBoxvender1.getSelectedIndex()).getVenderId(); 
        int accountid=adl.get(jComboBoxaccname1.getSelectedIndex()).getAccountid(); 
         pc.setVenderId(venderid);
         pc.setBuildlDate(jCalendarCombobuildate.getDate());
         pc.setAccountId(accountid);
         pc.setState(state.getSelectedItem().toString());
         pc.setUnit(jComboBoxunit.getSelectedItem().toString());
         pc.setTotalCost(Double.valueOf(jTextFieldtotal.getText()));
         pc.setBillId(Integer.valueOf(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 0).toString()));
        if(pc.UpdateBpurchase())
        {
            ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\edit_male_user_icon.png");
            JOptionPane.showMessageDialog(null, "Press OK to continue", "Success", 0, iic);
        }
        else
        {
              ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\canhbao.png");
                    JOptionPane.showMessageDialog(null, "Press OK to continue", "Failed", 0, iic);
        }
        }
        catch(Exception ex)
        {
            
        }
    }
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        
        Updatepurchasebill();
        cretatetalbalepurchaseill();
         Refespurchasebill();
        jButton2.setEnabled(false);
        
    }//GEN-LAST:event_jButton2ActionPerformed
     public void Deletepurchase()
    {
         PurchaseBill pc=new PurchaseBill();
        pc.setBillId(Integer.valueOf(jTablepurchase.getValueAt(jTablepurchase.getSelectedRow(), 0).toString()));
        System.out.println(Countrowtable());
        if(Countrowtable()==0)
        {
            if(pc.DeleteBpurchasebill())
            {
                try {
                    ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\delete_edit_trash_icon.png");
                    JOptionPane.showMessageDialog(null, "Press OK to continue", "Success", 0, iic);
                } catch (IOException ex) {
                    Logger.getLogger(JInternalFrameSalesBill.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            else
            {
                try {
                    ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\canhbao.png");
                            JOptionPane.showMessageDialog(null, "Press Ok to continue", "Failed", 0, iic);
                } catch (IOException ex) {
                    Logger.getLogger(JInternalFrameSalesBill.class.getName()).log(Level.SEVERE, null, ex);
                }
            } 
        }
        else
        {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\canhbao.png");
                               JOptionPane.showMessageDialog(null, "DetailPurchaseBill clear the board before", "Failed", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }   
      public int Countrowtable()
   {
       int count =0;
       count=jTabledetailpurcharbill.getRowCount();
       return count;
   }
    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
          int op = JOptionPane.showConfirmDialog(null, "Are you sure to delete ?", "Message", JOptionPane.OK_CANCEL_OPTION);
       if(op==JOptionPane.OK_OPTION)
        Deletepurchase();
        cretatetalbalepurchaseill();
        // Refespurchasebill();
        jButton4.setEnabled(false);
        
    }//GEN-LAST:event_jButton4ActionPerformed
     public int prdid()
    {
          int index=jComboBoxproduct1.getSelectedIndex();
            Product pr=new Product();
            pdl1=pr.Vectorproduct1();
            int productid=pdl1.get(index).getProductId();
            return productid;
    }
      public void Adddetailpurchar()
    { 
        try
        {
            
        
            int productid=prdid();  
         int billid= PurchaseBill.getpurcharbill().getBillId();
           DetailPurchaseBill dt=new DetailPurchaseBill();
           dt.setBillId(billid);
           dt.setProduceId(productid);
           dt.setPrice(Double.valueOf(this.jTextFieldprice.getText()));
           dt.setQuantily(Integer.valueOf(this.jTextFieldquantity.getText()));
           dt.setDescription(this.jTextAreadesription.getText());
           if(dt.Adddetailpurchasebill())
           {
                 ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\change.png");
                    JOptionPane.showMessageDialog(null, "Press OK to continue", "Success", 0, iic);
           }
           else
           {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\war.png");
                    JOptionPane.showMessageDialog(null, "Press OK to continue", "Failed", 0, iic);
           }
        }
        catch(Exception ex)
        {
            System.out.println(ex);
        }
      
    }
      public void updateproduct()
      {
          Product pr=new Product();
          pr.setPrice(Double.valueOf(jTextFieldprice.getText()));
          pr.setProductName(jComboBoxproduct1.getSelectedItem().toString());
          int qt=pr.getquantityproduct().getQuantily();
          pr.setQuantily(Integer.valueOf(jTextFieldquantity.getText())+qt);         
          if(pr.updateproduct())
          {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\change.png");
                         JOptionPane.showMessageDialog(null,"Prouct Updated", "Success", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
          else
          {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\war.png");
                         JOptionPane.showMessageDialog(null, "Press OK to continue", "Failed", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
              
      }
      
    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
        if(jTextFieldprice.getText().equals(""))
        {
            jTextFieldprice.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
         jTextFieldprice.setText("Not Null");
        }
        else if(Check.isNumber1(jTextFieldprice.getText())==false)
        {
            jTextFieldprice.setText("Is number");
        }
         else if(jTextFieldquantity.getText().equals(""))
        {
            jTextFieldquantity.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
         jTextFieldquantity.setText("Not Null");
        }
       else if(Check.isNumber(jTextFieldquantity.getText())==false)
        {
            jTextFieldquantity.setText("Is number");
        }
        else
        {
        Adddetailpurchar();
        updateproduct();
        Createcoboproduc1();
        
        rf();
        jTabbedPane2.setVisible(false);
        }
    }//GEN-LAST:event_jButton13ActionPerformed
//     public void Deletedetailsalesbill()
//    {
//        try
//        {
//           DetailPurchaseBill dtpc=new DetailPurchaseBill();
//           dtpc.setProduceId(Integer.valueOf(jTabledetailpurcharbill.getValueAt(jTabledetailpurcharbill.getSelectedRow(), 0).toString()));
//           if(dtpc.DeletedetailBpurcharbill())
//           {
//                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\delete_edit_trash_icon.png");
//                JOptionPane.showMessageDialog(null, "Press OK to continue", "Success", 0, iic);
//           }
//           else
//           {
//               ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\canhbao.png");
//                        JOptionPane.showMessageDialog(null, "Press Ok to continue", "Failed", 0, iic);
//           }
//        }
//        catch(Exception ex)
//        {
//            //System.out.println(ex);
//        }
//    }  
     public void hiren()
     {
         jTextField1prd.setEnabled(false);
         jTextFieldpr.setEnabled(false);
         jTextFieldqt.setEnabled(false);
         jTextAreadet.setEnabled(false);
     }    public void informationfromdetailpurchasebill()
    {
        jTextField1prd.setText(jTabledetailpurcharbill.getValueAt(jTabledetailpurcharbill.getSelectedRow(), 0).toString());
        jTextFieldpr.setText(jTabledetailpurcharbill.getValueAt(jTabledetailpurcharbill.getSelectedRow(), 1).toString());
        jTextFieldqt.setText(jTabledetailpurcharbill.getValueAt(jTabledetailpurcharbill.getSelectedRow(), 2).toString());
        jTextAreadet.setText(jTabledetailpurcharbill.getValueAt(jTabledetailpurcharbill.getSelectedRow(), 3).toString());
        
        
    }
    private void jTabledetailpurcharbillMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabledetailpurcharbillMouseClicked
        informationfromdetailpurchasebill();
        //jButton15.setEnabled(true);
    }//GEN-LAST:event_jTabledetailpurcharbillMouseClicked
    public void Refespurchasebill()
    {
        jTextFieldbillname.setText("");
         combovender();
        Createcbad();
        Createcoboproduc1();
        jCalendarCombobuildate.setSelectedItem("Select");
        state.setSelectedItem("Select");
        jTextFieldtotal.setText("");
        jComboBoxunit.setSelectedItem("Select");
        jComboBoxproduct1.setEnabled(false);
         jTabbedPane2.setVisible(false);
    }
    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
            jButton1.setEnabled(true);  
            unhire();
            Refespurchasebill();
             jTabbedPane2.setVisible(false);
             jButton2.setEnabled(false);
             jButton4.setEnabled(false);
            System.out.println(jComboBoxvender1.getSelectedItem());
    }//GEN-LAST:event_jButton6ActionPerformed
    public void rf()
    {
         jTextFieldprice.setText(null);
           jTextFieldquantity.setText(null);
           jTextAreadesription.setText(null);
    }
    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
      rf();
    }//GEN-LAST:event_jButton14ActionPerformed

    private void jTextFieldbillnameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldbillnameMouseClicked
        jTextFieldbillname.setText("");
        jTextFieldbillname.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldbillnameMouseClicked

    private void jCalendarCombobuildateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCalendarCombobuildateActionPerformed
        jCalendarCombobuildate.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jCalendarCombobuildateActionPerformed

    private void jComboBoxaccname1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxaccname1ActionPerformed
        jComboBoxaccname1.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jComboBoxaccname1ActionPerformed

    private void stateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_stateActionPerformed
       state.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_stateActionPerformed

    private void jTextFieldtotalMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldtotalMouseClicked
        jTextFieldtotal.setText("");
        jTextFieldtotal.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldtotalMouseClicked

    private void jTextFieldpriceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldpriceMouseClicked
    jTextFieldprice.setText("");
    jTextFieldprice.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldpriceMouseClicked

    private void jTextFieldquantityMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldquantityMouseClicked
    
     jTextFieldquantity.setText("");
    jTextFieldquantity.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldquantityMouseClicked

    private void jComboBoxproduct1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxproduct1ActionPerformed
         jComboBoxproduct1.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
        jTabbedPane2.setVisible(true);
        jTabbedPane2.removeAll();
        jTabbedPane2.addTab("Add Detail PurchaseBill",  jPanel6);
        JPanel pn=new JPanel();
         jTabbedPane2.addTab("Detail PurchaseBill",  pn);
         JPanel pm=new JPanel();
         jTabbedPane2.addTab("New Product",  pm);
         JPanel pl=new JPanel();
         jTabbedPane2.addTab("New Vender",  pl);
    }//GEN-LAST:event_jComboBoxproduct1ActionPerformed

    private void jComboBoxvender1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxvender1ActionPerformed
            jComboBoxvender1.setBorder(javax.swing.BorderFactory.createLineBorder(Color.gray));
    }//GEN-LAST:event_jComboBoxvender1ActionPerformed

    private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed

        jTabbedPane2.setVisible(true);
        jTabbedPane2.removeAll();
        jTabbedPane2.addTab("New Vender",  jPanel100);
        JPanel pn=new JPanel();
         jTabbedPane2.addTab("Detail PurchaseBill",  pn);
         JPanel pm=new JPanel();
         jTabbedPane2.addTab("New Product",  pm);
         JPanel pl=new JPanel();
         jTabbedPane2.addTab("Add Detail PurchaseBill",  pl);
         jComboBoxvender1.setEnabled(false);
    }//GEN-LAST:event_jButton18ActionPerformed

    private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
      jTabbedPane2.setVisible(true);
        jTabbedPane2.removeAll();
        jTabbedPane2.addTab("New Product",  jPanel99);
        JPanel pn=new JPanel();
         jTabbedPane2.addTab("Detail PurchaseBill",  pn);
         JPanel pm=new JPanel();
         jTabbedPane2.addTab("New Venders",  pm);
         JPanel pl=new JPanel();
         jTabbedPane2.addTab("Add Detail PurchaseBill",  pl);
         jComboBoxproduct1.setEnabled(false);
    }//GEN-LAST:event_jButton17ActionPerformed

    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
        if(jTextFieldvendername.getText().equals(""))
        {
             jTextFieldvendername.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
             jTextFieldvendername.setText("Not Null");
        }
        else if(jTextFieldaddress.getText().equals(""))
        {
            jTextFieldaddress.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
             jTextFieldaddress.setText("Not Null");
        }
         else if(jTextFieldemail.getText().equals(""))
        {
            jTextFieldemail.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
             jTextFieldemail.setText("Not Null");
        }
        else if(!Check.Emailinvalid(jTextFieldemail.getText()))  
        {
            jTextFieldemail.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
           jTextFieldemail.setText("Type Email....");
        }
         else if(jTextFieldphone.getText().equals(""))
        {
            jTextFieldphone.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
             jTextFieldphone.setText("Not Null");
        }
        else
        {
        updatevender();
        combovender();
        rfvender();
        jComboBoxvender1.setEnabled(true);
        jTabbedPane2.setVisible(false);
        }
    }//GEN-LAST:event_jButton16ActionPerformed
    public void rfvender()
    {
        jTextFieldvendername.setText("");
        jTextFieldaddress.setText("");
        jTextFieldemail.setText("");
        jTextFieldphone.setText("");
    }
    private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
        rfvender();
    }//GEN-LAST:event_jButton19ActionPerformed

    private void jTextFieldvendernameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldvendernameMouseClicked
        jTextFieldvendername.setText("");
        jTextFieldvendername.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldvendernameMouseClicked

    private void jTextFieldaddressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldaddressActionPerformed
       
         
    }//GEN-LAST:event_jTextFieldaddressActionPerformed

    private void jTextFieldemailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldemailActionPerformed
       
    }//GEN-LAST:event_jTextFieldemailActionPerformed

    private void jTextFieldphoneMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldphoneMouseClicked
          jTextFieldphone.setText("");
         jTextFieldphone.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldphoneMouseClicked

    private void jTextFieldemailMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldemailMouseClicked
          jTextFieldemail.setText("");
         jTextFieldemail.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldemailMouseClicked

    private void jTextFieldaddressMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextFieldaddressMouseClicked
        jTextFieldaddress.setText("");
         jTextFieldaddress.setBorder(javax.swing.BorderFactory.createLineBorder(Color.GRAY));       
    }//GEN-LAST:event_jTextFieldaddressMouseClicked
    public void hire()
    {
        jTextFieldbillname.setEnabled(false);
        jComboBoxvender1.setEnabled(false);
        jButton18.setEnabled(false);
        jCalendarCombobuildate.setEnabled(false);
        jComboBoxaccname1.setEnabled(false);
        state.setEnabled(false);
        jTextFieldtotal.setEnabled(false);
        jComboBoxunit.setEnabled(false);
    }
    public void unhire()
    {
        jTextFieldbillname.setEnabled(true);
        jComboBoxvender1.setEnabled(true);
        jButton18.setEnabled(true);
        jCalendarCombobuildate.setEnabled(true);
        jComboBoxaccname1.setEnabled(true);
        state.setEnabled(true);
        jTextFieldtotal.setEnabled(true);
        jComboBoxunit.setEnabled(true);
    }
    
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        if(jTextFieldbillname.getText().equals(""))
     {
         jTextFieldbillname.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
         jTextFieldbillname.setText("Not Null");
     }
     else  if(jComboBoxvender1.getSelectedItem().equals("Select"))
     {
         jComboBoxvender1.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
     }        
     else  if(jCalendarCombobuildate.getSelectedItem().equals("Select"))
     {
         jCalendarCombobuildate.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
     }   
     else  if(jComboBoxaccname1.getSelectedItem().equals("Select"))
     {
         jComboBoxaccname1.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
     }   
      else  if(state.getSelectedItem().equals("Select"))
     {
         state.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
     }   
      else  if(jTextFieldtotal.getText().equals(""))
     {
         jTextFieldtotal.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
         jTextFieldtotal.setText("Not Null");
     } 
     else  if(Check.isNumber1(jTextFieldtotal.getText())==false)
     {
         jTextFieldtotal.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
        jTextFieldtotal.setText("Is Number");
     } 
      else  if(jComboBoxunit.getSelectedItem().equals("Select"))
     {
         jComboBoxunit.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));
     }   
     else
     {
     jButton1.setEnabled(false);
     Addpurchasebill();
     cretatetalbalepurchaseill();
     jComboBoxproduct1.setBorder(javax.swing.BorderFactory.createLineBorder(Color.RED));       
     jComboBoxproduct1.setEnabled(true);
     Createcoboproduc1();
     hire();
     }
    

    }//GEN-LAST:event_jButton1ActionPerformed
    public void updatevender()
    {
        Vender vd=new Vender();
        vd.setVenderName(jTextFieldvendername.getText());
        vd.setAddress(jTextFieldaddress.getText());
        vd.setEmail(jTextFieldemail.getText());
        vd.setPhone(jTextFieldphone.getText());
        if(vd.AddVD())
        {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\change.png");
                          JOptionPane.showMessageDialog(null,"Press Ok to continue", "Success", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        else
        {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\war.png");
                           JOptionPane.showMessageDialog(null, "Press OK to continue", "Failed", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }    
    public void Addpurchasebill()
    {
        PurchaseBill pc=new PurchaseBill();
        pc.setBillName(this.jTextFieldbillname.getText());
        int venderid=combovender.get(jComboBoxvender1.getSelectedIndex()).getVenderId();
        pc.setVenderId(venderid);
        int accid=adl.get(jComboBoxaccname1.getSelectedIndex()).getAccountid();
        pc.setAccountId(accid);
         pc.setBuildlDate(jCalendarCombobuildate.getDate());
         pc.setState(state.getSelectedItem().toString());
         pc.setUnit(jComboBoxunit.getSelectedItem().toString());
         pc.setTotalCost(Double.valueOf(jTextFieldtotal.getText()));
         if(pc.Addpurchasebill())
         {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\change.png");
                       JOptionPane.showMessageDialog(null,"Select Product to continue", "Success", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
         }
         else
         {
            try {
                ImageIcon iic = new ImageIcon(f.getCanonicalPath()+"\\src\\Images\\war.png");
                        JOptionPane.showMessageDialog(null, "Press OK to continue", "Failed", 0, iic);
            } catch (IOException ex) {
                Logger.getLogger(JInternalFramePrchaseBill1.class.getName()).log(Level.SEVERE, null, ex);
            }
         }
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private org.freixas.jcalendar.JCalendarCombo jCalendarCombobuildate;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JComboBox jComboBox5;
    private javax.swing.JComboBox jComboBoxaccname1;
    private javax.swing.JComboBox jComboBoxproduct1;
    private javax.swing.JComboBox jComboBoxunit;
    private javax.swing.JComboBox jComboBoxvender1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel100;
    private javax.swing.JPanel jPanel101;
    private javax.swing.JPanel jPanel102;
    private javax.swing.JPanel jPanel103;
    private javax.swing.JPanel jPanel104;
    private javax.swing.JPanel jPanel105;
    private javax.swing.JPanel jPanel106;
    private javax.swing.JPanel jPanel107;
    private javax.swing.JPanel jPanel108;
    private javax.swing.JPanel jPanel109;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel110;
    private javax.swing.JPanel jPanel111;
    private javax.swing.JPanel jPanel112;
    private javax.swing.JPanel jPanel113;
    private javax.swing.JPanel jPanel114;
    private javax.swing.JPanel jPanel115;
    private javax.swing.JPanel jPanel116;
    private javax.swing.JPanel jPanel117;
    private javax.swing.JPanel jPanel118;
    private javax.swing.JPanel jPanel119;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel122;
    private javax.swing.JPanel jPanel123;
    private javax.swing.JPanel jPanel124;
    private javax.swing.JPanel jPanel125;
    private javax.swing.JPanel jPanel126;
    private javax.swing.JPanel jPanel127;
    private javax.swing.JPanel jPanel128;
    private javax.swing.JPanel jPanel129;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel131;
    private javax.swing.JPanel jPanel132;
    private javax.swing.JPanel jPanel133;
    private javax.swing.JPanel jPanel134;
    private javax.swing.JPanel jPanel135;
    private javax.swing.JPanel jPanel136;
    private javax.swing.JPanel jPanel137;
    private javax.swing.JPanel jPanel138;
    private javax.swing.JPanel jPanel139;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel140;
    private javax.swing.JPanel jPanel141;
    private javax.swing.JPanel jPanel142;
    private javax.swing.JPanel jPanel143;
    private javax.swing.JPanel jPanel144;
    private javax.swing.JPanel jPanel145;
    private javax.swing.JPanel jPanel146;
    private javax.swing.JPanel jPanel147;
    private javax.swing.JPanel jPanel148;
    private javax.swing.JPanel jPanel149;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel150;
    private javax.swing.JPanel jPanel151;
    private javax.swing.JPanel jPanel152;
    private javax.swing.JPanel jPanel153;
    private javax.swing.JPanel jPanel154;
    private javax.swing.JPanel jPanel155;
    private javax.swing.JPanel jPanel156;
    private javax.swing.JPanel jPanel157;
    private javax.swing.JPanel jPanel159;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel160;
    private javax.swing.JPanel jPanel161;
    private javax.swing.JPanel jPanel162;
    private javax.swing.JPanel jPanel163;
    private javax.swing.JPanel jPanel164;
    private javax.swing.JPanel jPanel165;
    private javax.swing.JPanel jPanel167;
    private javax.swing.JPanel jPanel168;
    private javax.swing.JPanel jPanel169;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel56;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel61;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel67;
    private javax.swing.JPanel jPanel68;
    private javax.swing.JPanel jPanel69;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel70;
    private javax.swing.JPanel jPanel71;
    private javax.swing.JPanel jPanel72;
    private javax.swing.JPanel jPanel73;
    private javax.swing.JPanel jPanel74;
    private javax.swing.JPanel jPanel75;
    private javax.swing.JPanel jPanel76;
    private javax.swing.JPanel jPanel77;
    private javax.swing.JPanel jPanel78;
    private javax.swing.JPanel jPanel79;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel80;
    private javax.swing.JPanel jPanel81;
    private javax.swing.JPanel jPanel82;
    private javax.swing.JPanel jPanel83;
    private javax.swing.JPanel jPanel84;
    private javax.swing.JPanel jPanel85;
    private javax.swing.JPanel jPanel86;
    private javax.swing.JPanel jPanel87;
    private javax.swing.JPanel jPanel88;
    private javax.swing.JPanel jPanel89;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanel90;
    private javax.swing.JPanel jPanel91;
    private javax.swing.JPanel jPanel92;
    private javax.swing.JPanel jPanel93;
    private javax.swing.JPanel jPanel94;
    private javax.swing.JPanel jPanel95;
    private javax.swing.JPanel jPanel96;
    private javax.swing.JPanel jPanel97;
    private javax.swing.JPanel jPanel98;
    private javax.swing.JPanel jPanel99;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTabledetailpurcharbill;
    private javax.swing.JTable jTablepurchase;
    private javax.swing.JTextArea jTextAreadesription;
    private javax.swing.JTextArea jTextAreadet;
    private javax.swing.JTextField jTextField1prd;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextFieldaddress;
    private javax.swing.JTextField jTextFieldbillname;
    private javax.swing.JTextField jTextFieldemail;
    private javax.swing.JTextField jTextFieldphone;
    private javax.swing.JTextField jTextFieldpr;
    private javax.swing.JTextField jTextFieldprice;
    private javax.swing.JTextField jTextFieldqt;
    private javax.swing.JTextField jTextFieldquantity;
    private javax.swing.JTextField jTextFieldtotal;
    private javax.swing.JTextField jTextFieldvendername;
    private javax.swing.JComboBox state;
    // End of variables declaration//GEN-END:variables
}
